<?php

namespace App\Models;

class Footage extends Base
{
    /**
     * 音频（一对一关系）
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function audio() {
        return $this->belongsTo(Audio::class);
    }
    
    /**
     * 镜头（一对多关系）
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function parts() {
        return $this->hasMany(FootagePart::class);
    }
    
    /**
     * 成品视频（一对多关系）
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function products() {
        return $this->hasMany(Product::class);
    }
    
    /**
     * 文案（一对一关系）
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function papper() {
        return $this->belongsTo(Footage::class);
    }
}
